package edu.sctu.xiangkun.day201505.day20150527.eatmeals;


import java.util.Random;
import java.util.Scanner;

/**
 * Created by lenovo on 2015/5/27.
 */
public class Student {

    public void selectWindows(){

        Windows windows = new Windows();

        System.out.println("您所选的窗口："+ windows.getWindowsnumber());
    }
    
    public void selectLine(){
        Line line = new Line();
       line.getLinenumber();
    }

    public void selectFood(){
        Foods foods = new Foods();
        foods.getFoodname();

        Scanner input = new Scanner(System.in);
        String foodname = input.next();

        StudentCard studentCard = new StudentCard();

            switch (foodname) {
                case "白菜炒肉":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "红烧牛肉":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "尖椒炒猪肝":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "土豆烧排骨":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "西红柿炒蛋":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "茄子炒肉":
                    System.out.println("价格：" + foods.getFoodprice());break;
                case "萝卜海带汤":
                    System.out.println("价格：" + foods.getFoodprice());break;
                default:
                    System.out.println("抱歉，没有这类菜肴！");break;
            }
        if(foods.getFoodprice() <= studentCard.getBalance()) {
            int x = studentCard.getBalance()-foods.getFoodprice();
            System.out.println("您剩余金额为："+x);
        }else {
            System.out.println(" 对不起，您的余额不足！");
       }

    }
    public void selectSeat(){
        System.out.println("您选的座位是：");
        Seats seats = new Seats();
        System.out.println(seats.getSeatNumber());

        Random random = new Random();
        int number  = random.nextInt(500);

        if(seats.getSeatNumber()==number){
            System.out.println("抱歉，此座位已有人！");
        }else {
            System.out.println("此座位没人，您可以入座！");
        }
    }
}
